package edu.gdkm;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
public class User {
    @Value("张三")
    private String username;
    private String sex;
    private Integer age;

    private Cat cat;
    @Autowired

    public User(Cat cat) {
        this.cat = cat;
    }
}
